<?php

class Profesional extends BaseModel {

    static $table_name = 'profesionales';
    static $primary_key = 'idprofesional';
    static $belongs_to = array(
        array(
            '_especialidad',
            'class_name' => 'Especialidad',
            'foreign_key' => 'especialidad'
        ), 
        array(
            '_carreradiferencial',
            'class_name' => 'CarreraProfesional',
            'foreign_key' => 'carreraDiferencial'
        )
    );
    
    static $has_many = array(
        array(
            '_solicitaciones',
            'class_name' => 'Orden',
            'foreign_key' => 'solicitante'
        ),
        array(
            '_prestaciones',
            'class_name' => 'DatoOrden',
        ),
        array(
            '_profplanes',
            'class_name' => 'ProfPlan',
            'foreign_key' => 'profesional'
        ),
        array(
            '_planes',
            'class_name' => 'Plan',
            'through' => '_profplanes'
        )
    );
}

?>
